package com.boarsoft.message.sofamq;

import java.util.Properties;

public class SofaMqConfig {

	private String ak;
	private String sk;
	private String endpoint;
	private String instanceId;
	private String groupId;
	private String topic;
	private String tag = "*";
	private String messageModel = "CLUSTERING";

	public SofaMqConfig() {

	}

	public SofaMqConfig(String ak, String sk, String endpoint, String instanceId) {
		this.ak = ak;
		this.sk = sk;
		this.endpoint = endpoint;
		this.instanceId = instanceId;
	}

	public Properties getBaseMqProperties() {
		Properties properties = new Properties();
		properties.setProperty("driver", "sofamq");
		properties.setProperty("accessKey", this.ak);
		properties.setProperty("secretKey", this.sk);
		properties.setProperty("endpoint", this.endpoint);
		return properties;
	}

	public Properties getProdMqProperties() {
		Properties properties = new Properties();
		properties.setProperty("instanceId", this.instanceId);
		return properties;
	}

	public String getAk() {
		return ak;
	}

	public void setAk(String ak) {
		this.ak = ak;
	}

	public String getSk() {
		return sk;
	}

	public void setSk(String sk) {
		this.sk = sk;
	}

	public String getEndpoint() {
		return endpoint;
	}

	public void setEndpoint(String endpoint) {
		this.endpoint = endpoint;
	}

	public String getInstanceId() {
		return instanceId;
	}

	public void setInstanceId(String instanceId) {
		this.instanceId = instanceId;
	}

	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public String getTopic() {
		return topic;
	}

	public void setTopic(String topic) {
		this.topic = topic;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public String getMessageModel() {
		return messageModel;
	}

	public void setMessageModel(String messageModel) {
		this.messageModel = messageModel;
	}
}
